package cn.itcast.fegin.client;



import cn.itcast.fegin.config.DefaultFeignConfiguration;
import cn.itcast.fegin.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "userservice",configuration = DefaultFeignConfiguration.class)   //声明服务名称   Feign打印日志级别
public interface UserClient {

    @GetMapping("/user/{id}")
    User findUserById(@PathVariable Long id);
}
